package com.codeyang.feign;

import com.codeyang.domain.User;
import com.codeyang.feign.hystrix.ProdCommUserFeignHystrix;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;
import java.util.Set;

/**
 * @Author 武汉尚学堂
 */
@FeignClient(value = "member-service", fallback = ProdCommUserFeignHystrix.class)
public interface ProdCommUserFeign {

    /**
     * 远程调用根据用户的ids查询用户集合
     *
     * @param userIds
     * @return
     */
    @PostMapping("p/user/getUsersByIds")
    List<User> getUsersByIds(@RequestBody Set<String> userIds);


}